package com.example.iterator;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Created by Risky57 on 2017/4/28.
 */

public class IteratorDemo {

    public static void main (String[] args) {

        Iterable teachers = new Parents();
        Iterator teacherIterator = teachers.iterator();
        while (teacherIterator.hasNext()){
            String next = (String) teacherIterator.next();
            System.out.println(next);
        }


        Map<String, String> map = new HashMap<>();

        for (Map.Entry<String, String> entry : map.entrySet()) {
            entry.getKey();
            entry.getValue();
        }

        java.util.Iterator<String> iterator = map.values().iterator();

//        Set

    }
}
